package HandsOn1;
import java.io.*;

public class TryThread2 extends Thread{
	int id;
	
	public TryThread2(int threadNum){
		this.id = threadNum;
	}
	
	public static void main(String[] args){
		TryThread2 t1 = new TryThread2(1);
		TryThread2 t2 = new TryThread2(2);
		TryThread2 t3 = new TryThread2(3);
		t1.start();
		t2.start();
		t3.start();
		try{
			System.in.read();
			System.out.println("Enter pressed...\n");
		}catch(IOException e){}
			System.out.println("Ending Main()");
			return;
		}
	
	public void run(){
		int i =0;
		while (true){
			System.out.println("Thread " + id + ": " + i++);
		}
	}
	
}
